from django.conf.urls.defaults import *
from django.conf import settings
from django.contrib import admin
from django.http import HttpResponseRedirect

admin.autodiscover()

def go_to_def(request):
    return HttpResponseRedirect("/en/")

urlpatterns = patterns(
    '',
    (r'^$', go_to_def),
    (r'^admin/(.*)', admin.site.root),
    url(r'en/gallery/(?P<slug>[-\w]+)/$', 'basesite.gallery.views.view', name='gallery-view-en'),
    url(r'ru/gallery/(?P<slug>[-\w]+)/$', 'basesite.gallery.views.view', name='gallery-view-ru'),

    url(r'en/contacts/$', 'basesite.views.contact', name='contact-en'),
    url(r'ru/contacts/$', 'basesite.views.contact', name='contact-ru'),

)

if settings.DEBUG == True:
    urlpatterns += patterns('', 
        (r'^s/(?P<path>.*)$', 'django.views.static.serve', {'document_root': settings.MEDIA_ROOT}),)

